unit uCxtServerWorkerThread;

interface

uses
  SysUtils,
  Classes,
  Windows,
  uDZWinThread;

type
  TServerWorkerThread = class(TWinThread)
  private
    fTerminateSignal: THandle;
  protected
    procedure Execute; override;
  public
    constructor Create;
    destructor Destroy; override;
    procedure Stop; override;
  end;

implementation

{ TServerWorkerThread }

constructor TServerWorkerThread.Create;
begin
  inherited Create(nil);
  fTerminateSignal := CreateEvent(nil, False, False, nil);
end;

destructor TServerWorkerThread.Destroy;
begin
  CloseHandle(fTerminateSignal);
  inherited;
end;

procedure TServerWorkerThread.Execute;
begin
  inherited;

end;

procedure TServerWorkerThread.Stop;
begin
  inherited;
  SetEvent(fTerminateSignal);
end;

end.
